---
import BaseLayout from "../layouts/BaseLayout.astro";
import Add from "../components/add.vue";
import Greeting from "../components/Greeting.jsx";
const pageTitle = "首页";
// import * as $http from "../scripts/fetch.js";
// import { fetch } from 'astro';
let data = { id: 0 };
const response =await fetch('https://api-test.bgshfamily.com/app/mock/getToken')
console.log(response,'000')
// $http.post("/app/mock/getToken", data).then((res) => {
//   console.log("res:", res);
// }).catch((err)=>{
//   console.log(err)
// })
---

<BaseLayout pageTitle={pageTitle}>
  <debug></debug>
  <h2>My awesome blog subtitle</h2>
  <!-- 该组件的 JS 将在页面加载开始时导入 -->
  Vue组件：<Add client:load />
  <!-- 该组件的 JS 将不会发送给客户端，直到用户向下滚动到该组件在页面上可见时 -->
  <Greeting client:visible messages={["Hi", "Hello", "Howdy", "Hey there"]} />
  <!-- 这个组件不会在服务端渲染, 但是在页面加载时将渲染在客户端 -->
  <!-- <Greeting client:only="svelte" messages={["Hi", "Hello", "Howdy", "Hey there"]}/> -->
</BaseLayout>
